package 代码记录.指定公司代码练习记录.备战快手;

import java.util.LinkedHashMap;

/**
 * @author zx
 * @create 2023-05-13 13:21
 */
public class LRU {
    private int capacity;
    LinkedHashMap<Integer,Integer> cache = new LinkedHashMap<>();

    public LRU(int capacity){
        this.capacity = capacity;
    }

    public int get(int key){
        if(cache.containsKey(key)){
            makeRecently(key);
            return cache.get(key);
        }else{
            return -1;
        }
    }

    public void put(int key, int value){

    }

    private void makeRecently(int key){

    }
}
